/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudm_SDM
 * Nudm Subscriber Data Management Service. � 2019, 3GPP Organizational Partners
 * (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.0.alpha-1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "DnnConfiguration.h"

namespace oai {
namespace udm {
namespace model {

DnnConfiguration::DnnConfiguration() {
  m_IwkEpsInd                         = false;
  m_IwkEpsIndIsSet                    = false;
  m__5gQosProfileIsSet                = false;
  m_SessionAmbrIsSet                  = false;
  m__3gppChargingCharacteristics      = "";
  m__3gppChargingCharacteristicsIsSet = false;
  m_StaticIpAddressIsSet              = false;
  m_UpSecurityIsSet                   = false;
  m_PduSessionContinuityIndIsSet      = false;
  m_InvokeNefSelection                = false;
  m_InvokeNefSelectionIsSet           = false;
  m_NiddNefId                         = "";
  m_NiddNefIdIsSet                    = false;
  m_NiddInfoIsSet                     = false;
}

DnnConfiguration::~DnnConfiguration() {}

void DnnConfiguration::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json& j, const DnnConfiguration& o) {
  j                    = nlohmann::json();
  j["pduSessionTypes"] = o.m_PduSessionTypes;
  j["sscModes"]        = o.m_SscModes;
  if (o.iwkEpsIndIsSet()) j["iwkEpsInd"] = o.m_IwkEpsInd;
  if (o._5gQosProfileIsSet()) j["5gQosProfile"] = o.m__5gQosProfile;
  if (o.sessionAmbrIsSet()) j["sessionAmbr"] = o.m_SessionAmbr;
  if (o._3gppChargingCharacteristicsIsSet())
    j["3gppChargingCharacteristics"] = o.m__3gppChargingCharacteristics;
  if (o.staticIpAddressIsSet()) j["staticIpAddress"] = o.m_StaticIpAddress;
  if (o.upSecurityIsSet()) j["upSecurity"] = o.m_UpSecurity;
  if (o.pduSessionContinuityIndIsSet())
    j["pduSessionContinuityInd"] = o.m_PduSessionContinuityInd;
  if (o.invokeNefSelectionIsSet())
    j["invokeNefSelection"] = o.m_InvokeNefSelection;
  if (o.niddNefIdIsSet()) j["niddNefId"] = o.m_NiddNefId;
  if (o.niddInfoIsSet()) j["niddInfo"] = o.m_NiddInfo;
}

void from_json(const nlohmann::json& j, DnnConfiguration& o) {
  j.at("pduSessionTypes").get_to(o.m_PduSessionTypes);
  j.at("sscModes").get_to(o.m_SscModes);
  if (j.find("iwkEpsInd") != j.end()) {
    j.at("iwkEpsInd").get_to(o.m_IwkEpsInd);
    o.m_IwkEpsIndIsSet = true;
  }
  if (j.find("5gQosProfile") != j.end()) {
    j.at("5gQosProfile").get_to(o.m__5gQosProfile);
    o.m__5gQosProfileIsSet = true;
  }
  if (j.find("sessionAmbr") != j.end()) {
    j.at("sessionAmbr").get_to(o.m_SessionAmbr);
    o.m_SessionAmbrIsSet = true;
  }
  if (j.find("3gppChargingCharacteristics") != j.end()) {
    j.at("3gppChargingCharacteristics")
        .get_to(o.m__3gppChargingCharacteristics);
    o.m__3gppChargingCharacteristicsIsSet = true;
  }
  if (j.find("staticIpAddress") != j.end()) {
    j.at("staticIpAddress").get_to(o.m_StaticIpAddress);
    o.m_StaticIpAddressIsSet = true;
  }
  if (j.find("upSecurity") != j.end()) {
    j.at("upSecurity").get_to(o.m_UpSecurity);
    o.m_UpSecurityIsSet = true;
  }
  if (j.find("pduSessionContinuityInd") != j.end()) {
    j.at("pduSessionContinuityInd").get_to(o.m_PduSessionContinuityInd);
    o.m_PduSessionContinuityIndIsSet = true;
  }
  if (j.find("invokeNefSelection") != j.end()) {
    j.at("invokeNefSelection").get_to(o.m_InvokeNefSelection);
    o.m_InvokeNefSelectionIsSet = true;
  }
  if (j.find("niddNefId") != j.end()) {
    j.at("niddNefId").get_to(o.m_NiddNefId);
    o.m_NiddNefIdIsSet = true;
  }
  if (j.find("niddInfo") != j.end()) {
    j.at("niddInfo").get_to(o.m_NiddInfo);
    o.m_NiddInfoIsSet = true;
  }
}

PduSessionTypes DnnConfiguration::getPduSessionTypes() const {
  return m_PduSessionTypes;
}
void DnnConfiguration::setPduSessionTypes(PduSessionTypes const& value) {
  m_PduSessionTypes = value;
}
SscModes DnnConfiguration::getSscModes() const {
  return m_SscModes;
}
void DnnConfiguration::setSscModes(SscModes const& value) {
  m_SscModes = value;
}
bool DnnConfiguration::isIwkEpsInd() const {
  return m_IwkEpsInd;
}
void DnnConfiguration::setIwkEpsInd(bool const value) {
  m_IwkEpsInd      = value;
  m_IwkEpsIndIsSet = true;
}
bool DnnConfiguration::iwkEpsIndIsSet() const {
  return m_IwkEpsIndIsSet;
}
void DnnConfiguration::unsetIwkEpsInd() {
  m_IwkEpsIndIsSet = false;
}
SubscribedDefaultQos DnnConfiguration::get5gQosProfile() const {
  return m__5gQosProfile;
}
void DnnConfiguration::set5gQosProfile(SubscribedDefaultQos const& value) {
  m__5gQosProfile      = value;
  m__5gQosProfileIsSet = true;
}
bool DnnConfiguration::_5gQosProfileIsSet() const {
  return m__5gQosProfileIsSet;
}
void DnnConfiguration::unset_5gQosProfile() {
  m__5gQosProfileIsSet = false;
}
Ambr DnnConfiguration::getSessionAmbr() const {
  return m_SessionAmbr;
}
void DnnConfiguration::setSessionAmbr(Ambr const& value) {
  m_SessionAmbr      = value;
  m_SessionAmbrIsSet = true;
}
bool DnnConfiguration::sessionAmbrIsSet() const {
  return m_SessionAmbrIsSet;
}
void DnnConfiguration::unsetSessionAmbr() {
  m_SessionAmbrIsSet = false;
}
std::string DnnConfiguration::get3gppChargingCharacteristics() const {
  return m__3gppChargingCharacteristics;
}
void DnnConfiguration::set3gppChargingCharacteristics(
    std::string const& value) {
  m__3gppChargingCharacteristics      = value;
  m__3gppChargingCharacteristicsIsSet = true;
}
bool DnnConfiguration::_3gppChargingCharacteristicsIsSet() const {
  return m__3gppChargingCharacteristicsIsSet;
}
void DnnConfiguration::unset_3gppChargingCharacteristics() {
  m__3gppChargingCharacteristicsIsSet = false;
}
std::vector<IpAddress>& DnnConfiguration::getStaticIpAddress() {
  return m_StaticIpAddress;
}
bool DnnConfiguration::staticIpAddressIsSet() const {
  return m_StaticIpAddressIsSet;
}
void DnnConfiguration::unsetStaticIpAddress() {
  m_StaticIpAddressIsSet = false;
}
UpSecurity DnnConfiguration::getUpSecurity() const {
  return m_UpSecurity;
}
void DnnConfiguration::setUpSecurity(UpSecurity const& value) {
  m_UpSecurity      = value;
  m_UpSecurityIsSet = true;
}
bool DnnConfiguration::upSecurityIsSet() const {
  return m_UpSecurityIsSet;
}
void DnnConfiguration::unsetUpSecurity() {
  m_UpSecurityIsSet = false;
}
PduSessionContinuityInd DnnConfiguration::getPduSessionContinuityInd() const {
  return m_PduSessionContinuityInd;
}
void DnnConfiguration::setPduSessionContinuityInd(
    PduSessionContinuityInd const& value) {
  m_PduSessionContinuityInd      = value;
  m_PduSessionContinuityIndIsSet = true;
}
bool DnnConfiguration::pduSessionContinuityIndIsSet() const {
  return m_PduSessionContinuityIndIsSet;
}
void DnnConfiguration::unsetPduSessionContinuityInd() {
  m_PduSessionContinuityIndIsSet = false;
}
bool DnnConfiguration::isInvokeNefSelection() const {
  return m_InvokeNefSelection;
}
void DnnConfiguration::setInvokeNefSelection(bool const value) {
  m_InvokeNefSelection      = value;
  m_InvokeNefSelectionIsSet = true;
}
bool DnnConfiguration::invokeNefSelectionIsSet() const {
  return m_InvokeNefSelectionIsSet;
}
void DnnConfiguration::unsetInvokeNefSelection() {
  m_InvokeNefSelectionIsSet = false;
}
std::string DnnConfiguration::getNiddNefId() const {
  return m_NiddNefId;
}
void DnnConfiguration::setNiddNefId(std::string const& value) {
  m_NiddNefId      = value;
  m_NiddNefIdIsSet = true;
}
bool DnnConfiguration::niddNefIdIsSet() const {
  return m_NiddNefIdIsSet;
}
void DnnConfiguration::unsetNiddNefId() {
  m_NiddNefIdIsSet = false;
}
NiddInformation DnnConfiguration::getNiddInfo() const {
  return m_NiddInfo;
}
void DnnConfiguration::setNiddInfo(NiddInformation const& value) {
  m_NiddInfo      = value;
  m_NiddInfoIsSet = true;
}
bool DnnConfiguration::niddInfoIsSet() const {
  return m_NiddInfoIsSet;
}
void DnnConfiguration::unsetNiddInfo() {
  m_NiddInfoIsSet = false;
}

}  // namespace model
}  // namespace udm
}  // namespace oai
